home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Games
/
PC-SIG World of Games (CDRM1080710) (1993).iso
/
ENT
/
DISK2468.ZIP
/
MM
/
MOUSE.H
< prev
next >
Wrap
Text File
|
1990-03-25
|
3KB
|
87 lines
/* Mouse toolkit header file */
/* Macros to retrieve low and high byte of an integer */
#define CTRLC 0x2e03
#define CTRLH 0x2308
#define CTRLI 0x1709
#define CTRLK 0x250b
#define CTRLJ 0x240a
#define CTRLU 0x1615
#define CTRLR 0x1312
#define CRKEY 0x1c0d
#define CTRLCRKEY 0x1c0a
#define UPKEY 0x4800
#define DOWNKEY 0x5000
#define LEFTKEY 0x4b00
#define RIGHTKEY 0x4d00
#define SHFTLEFT 0x4b34
#define SHFTRIGHT 0x4d36
#define DELKEY 0x5300
#define INSKEY 0x5200
#define SPACEBAR 0x3920
#define PGUPKEY 0x4900
#define PGDNKEY 0x5100
#define SHFTUPKEY 0x4838
#define SHFTDNKEY 0x5032
#define SHFTPGUPKEY 0x4939
#define SHFTPGDNKEY 0x5133
#define HOMEKEY 0x4700
#define ENDKEY 0x4f00
#define ESCKEY 0x011b
#define ALT_D 0x2000
#define ALT_E 0x1200
#define ALT_I 0x1700
#define ALT_R 0x1300
#define ALT_S 0x1f00
#define ALT_T 0x1400
#define ALT_X 0x2d00
#define F10KEY 0x4400
/* Mouse pseudo "key" codes */
#define LEFT_MOUSE_PRESS 0xff01
#define RIGHT_MOUSE_PRESS 0xff02
#define LEFT_MOUSE_REL 0xff11
#define RIGHT_MOUSE_REL 0xff12
/* Mouse driver function codes */
#define M_RESET 0
#define M_SHOW_CURS 1
#define M_HIDE_CURS 2
#define M_GET_STATUS 3
#define M_SET_CURS 4
#define M_GET_PRESS 5
#define M_GET_REL 6
#define M_SET_X_BOUNDS 7
#define M_SET_Y_BOUNDS 8
#define M_SET_G_CURS 9
#define M_SET_T_CURS 10
#define M_CHANGE_CURS 3
/* define other constants */
#define MOUSE_NEEDED 1
#define MOUSE_OPTIONAL 0
#define MOUSE_TEXT_MODE 0
#define CTRWIN 999 /* used in set_mouse_window function */
/* Mouse external variables */
extern int mouse_text_x;
extern int mouse_text_y;
extern int mouse_grph_x;
extern int mouse_grph_y;
extern int mouse_initialized;
/* Mouse function prototypes */
extern void mouse(int *m1, int *m2, int *m3, int *m4);
extern int check_mouse_driver(int need_mouse);
extern int init_mouse(int need_mouse, int gd, int gm);
extern int mouse_reset(void);
extern void move_mouse(int x, int y);
extern void mouse_on(int code);
extern void mouse_off(int code);
extern void mouse_grph_posn(int *x, int *y);
extern void mouse_text_posn(int *x, int *y);
extern int mouse_in_box(int graphflag, int left, int right,
int top, int bottom);
extern int button_resease(int b);
extern int button_press(int b);
extern int button_state(void);
extern int mouse_trigger(int button_dir);
extern void mouse_debounce(void);
extern int mouse_cursor(int *cursor, int horiz, int vert);
extern int set_mouse_xbounds(int left, int right);
extern int set_mouse_ybounds(int top, int bottom);
extern int set_mouse_window(int left, int top, int right, int bottom);